Drop separate scrollbar accessible implementation
authorMatthias Clasen <mclasen@redhat.com>
Thu, 27 Dec 2012 07:10:51 +0000 (02:10 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 27 Dec 2012 17:06:23 +0000 (12:06 -0500)
It didn't really add anything to the range accessible implementation.

gtk/a11y/Makefile.am
gtk/a11y/gtkscrollbaraccessible.c [deleted file]
gtk/a11y/gtkscrollbaraccessible.h [deleted file]
gtk/gtk-a11y.h
gtk/gtkscrollbar.c

index 9c5d9f96c022edb0e8405d8fd8ac89155f267d1d..3ad5bae6725a222e3c3b02bc00e9cf2094c5ad60 100644 (file)
@@ -38,7 +38,6 @@ gtka11y_c_sources =                   \
        gtkrenderercellaccessible.c     \
        gtkscaleaccessible.c            \
        gtkscalebuttonaccessible.c      \
-       gtkscrollbaraccessible.c        \
        gtkscrolledwindowaccessible.c   \
        gtkspinbuttonaccessible.c       \
        gtkspinneraccessible.c          \
@@ -85,7 +84,6 @@ gtka11yinclude_HEADERS =              \
        gtkrenderercellaccessible.h     \
        gtkscaleaccessible.h            \
        gtkscalebuttonaccessible.h      \
-       gtkscrollbaraccessible.h        \
        gtkscrolledwindowaccessible.h   \
        gtkspinbuttonaccessible.h       \
        gtkspinneraccessible.h          \
diff --git a/gtk/a11y/gtkscrollbaraccessible.c b/gtk/a11y/gtkscrollbaraccessible.c
deleted file mode 100644 (file)
index b9cd206..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/* GTK+ - accessibility implementations
- * Copyright 2001 Sun Microsystems Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-
-#include <gtk/gtk.h>
-#include "gtkscrollbaraccessible.h"
-
-
-G_DEFINE_TYPE (GtkScrollbarAccessible, gtk_scrollbar_accessible, GTK_TYPE_RANGE_ACCESSIBLE)
-
-static void
-gtk_scrollbar_accessible_init (GtkScrollbarAccessible *accessible)
-{
-}
-
-static void
-gtk_scrollbar_accessible_initialize (AtkObject *accessible,
-                                     gpointer   data)
-{
-  ATK_OBJECT_CLASS (gtk_scrollbar_accessible_parent_class)->initialize (accessible, data);
-
-  accessible->role = ATK_ROLE_SCROLL_BAR;
-}
-
-static gint
-gtk_scrollbar_accessible_get_index_in_parent (AtkObject *accessible)
-{
-  GtkWidget *widget;
-  GtkWidget *parent;
-  GtkWidget *child;
-  GtkScrolledWindow *scrolled_window;
-  gint id;
-
-  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
-  if (widget == NULL)
-    return -1;
-
-  parent = gtk_widget_get_parent (widget);
-  if (!GTK_IS_SCROLLED_WINDOW (parent))
-    return ATK_OBJECT_CLASS (gtk_scrollbar_accessible_parent_class)->get_index_in_parent (accessible);
-
-  scrolled_window = GTK_SCROLLED_WINDOW (parent);
-  id = 0;
-  child = gtk_bin_get_child (GTK_BIN (scrolled_window));
-  if (child)
-    {
-      if (widget == child)
-        return id;
-      id++;
-    }
-
-  child = gtk_scrolled_window_get_hscrollbar (scrolled_window);
-  if (child)
-    {
-      if (widget == child)
-        return id;
-      id++;
-    }
-  child = gtk_scrolled_window_get_vscrollbar (scrolled_window);
-  if (child)
-    {
-      if (widget == child)
-        return id;
-    }
-
-  return -1;
-}
-
-static void
-gtk_scrollbar_accessible_class_init (GtkScrollbarAccessibleClass *klass)
-{
-  AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-
-  class->initialize = gtk_scrollbar_accessible_initialize;
-  class->get_index_in_parent = gtk_scrollbar_accessible_get_index_in_parent;
-}
diff --git a/gtk/a11y/gtkscrollbaraccessible.h b/gtk/a11y/gtkscrollbaraccessible.h
deleted file mode 100644 (file)
index 57b9847..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/* GTK+ - accessibility implementations
- * Copyright 2001 Sun Microsystems Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#if !defined (__GTK_A11Y_H_INSIDE__) && !defined (GTK_COMPILATION)
-#error "Only <gtk/gtk-a11y.h> can be included directly."
-#endif
-
-#ifndef __GTK_SCROLLBAR_ACCESSIBLE_H__
-#define __GTK_SCROLLBAR_ACCESSIBLE_H__
-
-#include <gtk/a11y/gtkrangeaccessible.h>
-
-G_BEGIN_DECLS
-
-#define GTK_TYPE_SCROLLBAR_ACCESSIBLE                     (gtk_scrollbar_accessible_get_type ())
-#define GTK_SCROLLBAR_ACCESSIBLE(obj)                     (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SCROLLBAR_ACCESSIBLE, GtkScrollbarAccessible))
-#define GTK_SCROLLBAR_ACCESSIBLE_CLASS(klass)             (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SCROLLBAR_ACCESSIBLE, GtkScrollbarAccessibleClass))
-#define GTK_IS_SCROLLBAR_ACCESSIBLE(obj)                  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SCROLLBAR_ACCESSIBLE))
-#define GTK_IS_SCROLLBAR_ACCESSIBLE_CLASS(klass)          (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SCROLLBAR_ACCESSIBLE))
-#define GTK_SCROLLBAR_ACCESSIBLE_GET_CLASS(obj)           (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SCROLLBAR_ACCESSIBLE, GtkScrollbarAccessibleClass))
-
-typedef struct _GtkScrollbarAccessible        GtkScrollbarAccessible;
-typedef struct _GtkScrollbarAccessibleClass   GtkScrollbarAccessibleClass;
-typedef struct _GtkScrollbarAccessiblePrivate GtkScrollbarAccessiblePrivate;
-
-struct _GtkScrollbarAccessible
-{
-  GtkRangeAccessible parent;
-
-  GtkScrollbarAccessiblePrivate *priv;
-};
-
-struct _GtkScrollbarAccessibleClass
-{
-  GtkRangeAccessibleClass parent_class;
-};
-
-GType gtk_scrollbar_accessible_get_type (void);
-
-G_END_DECLS
-
-#endif /* __GTK_SCROLLBAR_ACCESSIBLE_H__ */
index e9c6ea806ebc56f1b8725bf4714388ca41e8a8a3..f5c5ec09afae40d3cc278bca3631d7942f0833d0 100644 (file)
@@ -59,7 +59,6 @@
 #include <gtk/a11y/gtkrenderercellaccessible.h>
 #include <gtk/a11y/gtkscaleaccessible.h>
 #include <gtk/a11y/gtkscalebuttonaccessible.h>
-#include <gtk/a11y/gtkscrollbaraccessible.h>
 #include <gtk/a11y/gtkscrolledwindowaccessible.h>
 #include <gtk/a11y/gtkspinbuttonaccessible.h>
 #include <gtk/a11y/gtkspinneraccessible.h>
index 9062118b8033b5fca6248f150ed2d23134742466..63cdf381cd6fe11ba54cfe731d6b7f9dc2cfda6d 100644 (file)
@@ -31,8 +31,6 @@
 #include "gtkintl.h"
 #include "gtkprivate.h"
 
-#include "a11y/gtkscrollbaraccessible.h"
-
 
 /**
  * SECTION:gtkscrollbar
@@ -111,7 +109,7 @@ gtk_scrollbar_class_init (GtkScrollbarClass *class)
                                                                  FALSE,
                                                                  GTK_PARAM_READABLE));
 
-  gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_SCROLLBAR_ACCESSIBLE);
+  gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_SCROLL_BAR);
 }
 
 static void